-
-
Notifications
You must be signed in to change notification settings - Fork 356
chore: Update to use current upstream modules #422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
@bryantbiggs I know you are a very busy man, and I apologize for bothering you, but is there anything i can do to assist with getting this reviewed and merged in? I have colleagues at other orgs hoping to use this update to the module |
I'll take a look this evening - apologies for the delay |
No worries, I know you can be slammed with all the modules, and always get a laugh when you remind people all this is offered for free, so I wasnt going to rush you or anything. I appreciate your time |
@@ -125,7 +125,7 @@ resource "random_password" "webhook_secret" { | |||
|
|||
module "secrets_manager" { | |||
source = "terraform-aws-modules/secrets-manager/aws" | |||
version = "~> 1.0" | |||
version = "1.3.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in examples we don't pin to a specific version, so lets revert changes like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its a good start but I think theres still quite a bit of work to do on aligning with the ECS module changes in v6.x
@@ -1,10 +1,10 @@ | |||
terraform { | |||
required_version = ">= 1.0" | |||
required_version = ">= 1.10" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are only raising to 1.5.7
at this time unless there is a strong reason for going higher - this should be carried throughout
required_version = ">= 1.10" | |
required_version = ">= 1.5.7" |
|
||
tags = var.tags | ||
} | ||
|
||
module "ecs_service" { | ||
source = "terraform-aws-modules/ecs/aws//modules/service" | ||
version = "5.11.0" | ||
version = "6.1.1" | ||
|
||
create = var.create | ||
|
||
# Service | ||
ignore_task_definition_changes = try(var.service.ignore_task_definition_changes, false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with the variable optional attributes, a lot of these try(()
blocks should be removed
|
||
create = var.create | ||
|
||
# Service | ||
ignore_task_definition_changes = try(var.service.ignore_task_definition_changes, false) | ||
alarms = try(var.service.alarms, {}) | ||
alarms = try(var.service.alarms, { alarm_names = [] }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change?
@@ -278,7 +279,7 @@ module "ecs_service" { | |||
iam_role_description = try(var.service.iam_role_description, null) | |||
iam_role_permissions_boundary = try(var.service.iam_role_permissions_boundary, null) | |||
iam_role_tags = try(var.service.iam_role_tags, {}) | |||
iam_role_statements = lookup(var.service, "iam_role_statements", {}) | |||
iam_role_statements = lookup(var.service, "iam_role_statements", []) | |||
|
|||
# Task definition | |||
create_task_definition = try(var.service.create_task_definition, true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the container definition input values are now camelCased
- so most of these below are incorrect
@@ -438,26 +437,32 @@ module "ecs_service" { | |||
security_group_name = try(var.service.security_group_name, null) | |||
security_group_use_name_prefix = try(var.service.security_group_use_name_prefix, true) | |||
security_group_description = try(var.service.security_group_description, null) | |||
security_group_rules = merge( | |||
security_group_ingress_rules = merge( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the plan for an upgrade guide for these disruptive/breaking changes?
required_version = ">= 1.0" | ||
required_version = ">= 1.10" | ||
|
||
required_providers { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are no aws
resources in the root module so we don't need the required provider here
Ill get started on these TY, and i think its the ACM module that used version 1.10, so i aligned with that, that said i beleive it was >= 1.10. Ill get this all fixed and answer some questions a little later when Im done with some work stuff |
Co-authored-by: Bryant Biggs <[email protected]>
Co-authored-by: Bryant Biggs <[email protected]>
ah, yes - it does https://github.com/terraform-aws-modules/terraform-aws-acm/blob/155b56d6b4263195ff528a609374de1fab22206b/versions.tf#L2 nvm, leave |
Description
This PR updates the module to align with changes introduced in terraform-aws-modules/ecs/aws v6.x. Specifically, it updates the usage of the ECS service and cluster submodules to reflect current upstream expectations and field structures.
Motivation and Context
Align with upstream module conventions (terraform-aws-modules/ecs/aws v6.x)
Remove deprecated fields and adopt new syntax for ECS cluster and service configuration
Ensure future compatibility and reduce drift from supported patterns
Breaking Changes
Yes.
fargate_capacity_providers has been removed and replaced by default_capacity_provider_strategy, matching upstream behavior.
service_registries must now be set to null or omitted entirely — using an empty list [] will result in a type error. This aligns with upstream, which expects an object, not a list.
Some internal variable defaults and structures were updated to follow upstream expectations, which may cause errors if older formats are used without adjustment.
How Has This Been Tested?
Deployed using the updated module in a live production environment
Verified ECS service behavior and cluster creation
Please let me know if there additional changes or things needed I may of missed